-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RustOptimize to set optimize #112756
Use RustOptimize to set optimize #112756
Conversation
r? @clubby789 (rustbot has picked a reviewer for you, use r? to override) |
e0da899
to
c382acb
Compare
Instead of |
I followed this suggestion. #112678 (comment) |
@Kobzol Any thoughts on the approach here? |
Maybe for options parsing it could stay as But in the parsed config it would be much nicer to have it as an enum. The |
32e4362
to
b6d2cde
Compare
Good suggestion! Thanks! |
It's better now, thanks. I would suggest two more things:
But I'll let others chime in :) These are small details. |
I agree with the above suggestions - I'd also like to ask if you can add a test to validate the new behaviour, but LGTM with these changes applied. |
b6d2cde
to
cd62f22
Compare
cd62f22
to
ec19653
Compare
Addressed.
Could you please give me some tips about how to add it? Or which test case I can refer to? |
Thanks for your review! 💚 💙 💜 💛 ❤️ |
@clubby789 Friendly ping~ Could you please take a look? Thanks! |
Sorry for the wait - you can look at https://github.com/rust-lang/rust/blob/master/src/bootstrap/config/tests.rs for some examples of testing the config. The changes themselves look good 🙂 |
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
ec19653
to
878eff1
Compare
@clubby789 Added. Thanks! I have a small question: How can I run an individual test from the Bootstrap module? Now I only can use |
This comment has been minimized.
This comment has been minimized.
It's a bit strange that I can pass the test locally. Is there some special configuration needed? Or is there something wrong with my test itself? |
|
r=me with tests fixed |
✌️ @hi-rustin, you can now approve this pull request! If @clubby789 told you to " |
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Got it. Thanks! |
☀️ Test successful - checks-actions |
assert_eq!(parse("").rust_optimize.is_release(), true); | ||
assert_eq!(parse("rust.optimize = false").rust_optimize.is_release(), false); | ||
assert_eq!(parse("rust.optimize = true").rust_optimize.is_release(), true); | ||
assert_eq!(parse("rust.optimize = \"1\"").rust_optimize.get_opt_level(), Some("1".to_string())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd prefer to require this to be an int instead of a string, so rust.optimize = 1
instead of \"1\"
. no one is using the new config yet so i think we can break hard here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the "s" and "z"? Do you mean we need to use an IntOrString here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, exactly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it later.
Finished benchmarking commit (be6e38c): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 661.616s -> 662.143s (0.08%) |
diesel and wg-grammar noise @rustbot label: +perf-regression-triaged |
close #112678
Use RustOptimize to set optimize.